# coding=utf-8
from __future__ import unicode_literals

from django.db import models
from django.db.models import *


# Create your models here.
class ProductModel(models.Model):
    id = AutoField(primary_key=True, unique=True)
    name = CharField(max_length=50)
    status = IntegerField(default=0)
    img_screen = ImageField(null=True)
    img_order = ImageField(null=True)
    img_confirm = ImageField(null=True)
    img_recom_1 = ImageField(null=True)
    img_recom_2 = ImageField(null=True)
    url = CharField(max_length=255)
    recommended_value = IntegerField(default=0)

    def __unicode__(self):
        return self.name

    class Meta:
        db_table = 't_product'

class GameProgressModel(models.Model):
    uid = IntegerField()   # user id
    gid = IntegerField()   # game id
    progress = CharField(max_length=1024)
    time = DateTimeField(auto_now_add=True)
